libxc: do not align/lock buffers which do not need it
authorIan Campbell <ian.campbell@citrix.com>
Fri, 22 Oct 2010 14:14:51 +0000 (15:14 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 22 Oct 2010 14:14:51 +0000 (15:14 +0100)
commitf36c8d0c957ba7f971d992f104b9984547e8429b
tree8b4e1bcddf35ac360a42bae069ccf09544b41456
parent254b93fd04733b0bb9fd6cea9b29db61e816a424
libxc: do not align/lock buffers which do not need it

On restore:

region_mfn is passed to xc_map_foreign_range and
xc_map_foreign_bulk. In both cases the buffer is accessed from the
ioctl handler in the kernel and not from any hypercall. Therefore
normal copy_{to,from}_user handling in the kernel will cope with any
faulting access.

p2m_batch is passed to xc_domain_memory_populate_physmap which takes
care of bouncing the buffer already.

On save:

pfn_type is passed to xc_map_foreign_bulk which does not need locking
as per region_mfn above.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
tools/libxc/xc_domain_restore.c
tools/libxc/xc_domain_save.c